package com.example.xiaosa.myapplication;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    protected Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.d(this.getLocalClassName(), "Application Start");
        TextView textView = (TextView) findViewById(R.id.helloWorld);
        button = (Button) findViewById(R.id.btnNewButton);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.i(this.getClass().getName(), "Click Button");
                setContentView(R.layout.first_layout);
                Log.i(getClass().getName(), "will into  firstActivity");
            }
        });


    }

    /**
     * @param v View
     */
    protected void onClick(View v) {
        Log.i(this.getClass().getName(), "Click Button");
    }

}
